<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子元素选择器</title>
    <style>
        div>p{
            background-color: green;
        }
    </style>
</head>
<!-- 与后代选择器相比，子元素选择器（Child selectors）只能选择作为某元素子元素的元素。 -->
<body>
    <h1>Welcome to My Homepage</h1>
    <div>
        <h2>My name is Donald</h2>
        <p>I live in Duckburg.</p>
    </div>

    <div>
        <span><p>I will not be styled.</p></span>
    </div>

    <p>My best friend is Mickey.</p>
</body>
</html>